package com.kingdee.pda.entity;

import java.util.ArrayList;
import java.util.List;

/**
 * 自定义补货操作对象
 * Created by dlj
 * DATE 2021/6/25
 * TIME 19:39
 */
public class ReplenishSkuBean {
    private boolean hasRecommed;
    private long billId;
    private long itemskuId;
    private String itemName;
    private String itemskuCode;
    private String itemskuName;
    private long wantQty;
    private int realQty;
    private long warehouseAreaId;
    private String warehouseAreaName;
    //推荐来源库位编码
    private String fromLocationNumber = "";
    //推荐来源库位ID
    private long fromLocationId;

    private String itemCode;//商品编码
    private String itemBarCode;//商品条码
    private long invStatusId;//库存状态id
    private String invStatusName;//库存状态

    public long getInvStatusId() {
        return invStatusId;
    }

    public void setInvStatusId(long invStatusId) {
        this.invStatusId = invStatusId;
    }

    public String getInvStatusName() {
        return invStatusName == null ? "" : invStatusName;
    }

    public void setInvStatusName(String invStatusName) {
        this.invStatusName = invStatusName;
    }

    private List<ActulBean> actulBeans = new ArrayList<>();

    public List<ActulBean> getActulBeans() {
        return actulBeans;
    }

    public void setActulBeans(List<ActulBean> actulBeans) {
        this.actulBeans = actulBeans;
    }

    public boolean isHasRecommed() {
        return hasRecommed;
    }

    public void setHasRecommed(boolean hasRecommed) {
        this.hasRecommed = hasRecommed;
    }

    public ReplenishSkuBean() {
    }

    public static class ActulBean {
        private String itemCode;//商品编码
        private String itemBarCode;//商品条码
        //目的库位编码
        private String targetLocationNumber = "";
        //目的库位ID
        private long targetLocationId;
        //实际来源库位编码
        private String actualFromLocationNumber = "";
        //实际来源库位ID
        private long actualFromLocationId;

        private int actulQty;

        public ActulBean(String targetLocationNumber, long targetLocationId, String actualFromLocationNumber, long actualFromLocationId, int actulQty) {
            this.targetLocationNumber = targetLocationNumber;
            this.targetLocationId = targetLocationId;
            this.actualFromLocationNumber = actualFromLocationNumber;
            this.actualFromLocationId = actualFromLocationId;
            this.actulQty = actulQty;
        }

        public String getItemCode() {
            return itemCode == null ? "" : itemCode;
        }

        public void setItemCode(String itemCode) {
            this.itemCode = itemCode;
        }

        public String getItemBarCode() {
            return itemBarCode == null ? "" : itemBarCode;
        }

        public void setItemBarCode(String itemBarCode) {
            this.itemBarCode = itemBarCode;
        }

        public int getActulQty() {
            return actulQty;
        }

        public void setActulQty(int actulQty) {
            this.actulQty = actulQty;
        }

        public String getTargetLocationNumber() {
            return targetLocationNumber;
        }

        public void setTargetLocationNumber(String targetLocationNumber) {
            this.targetLocationNumber = targetLocationNumber;
        }

        public long getTargetLocationId() {
            return targetLocationId;
        }

        public void setTargetLocationId(long targetLocationId) {
            this.targetLocationId = targetLocationId;
        }

        public String getActualFromLocationNumber() {
            return actualFromLocationNumber;
        }

        public void setActualFromLocationNumber(String actualFromLocationNumber) {
            this.actualFromLocationNumber = actualFromLocationNumber;
        }

        public long getActualFromLocationId() {
            return actualFromLocationId;
        }

        public void setActualFromLocationId(long actualFromLocationId) {
            this.actualFromLocationId = actualFromLocationId;
        }
    }

    public String getItemCode() {
        return itemCode;
    }

    public void setItemCode(String itemCode) {
        this.itemCode = itemCode;
    }

    public String getItemBarCode() {
        return itemBarCode;
    }

    public void setItemBarCode(String itemBarCode) {
        this.itemBarCode = itemBarCode;
    }

    public long getBillId() {
        return billId;
    }

    public void setBillId(long billId) {
        this.billId = billId;
    }

    public long getItemskuId() {
        return itemskuId;
    }

    public void setItemskuId(long itemskuId) {
        this.itemskuId = itemskuId;
    }

    public String getItemName() {
        return itemName;
    }

    public void setItemName(String itemName) {
        this.itemName = itemName;
    }

    public String getItemskuCode() {
        return itemskuCode;
    }

    public void setItemskuCode(String itemskuCode) {
        this.itemskuCode = itemskuCode;
    }

    public String getItemskuName() {
        return itemskuName;
    }

    public void setItemskuName(String itemskuName) {
        this.itemskuName = itemskuName;
    }

    public long getWantQty() {
        return wantQty;
    }

    public void setWantQty(long wantQty) {
        this.wantQty = wantQty;
    }

    public int getRealQty() {
        int qty = 0;
        for (ActulBean bean : actulBeans) {
            qty += bean.getActulQty();
        }
        return qty;
    }

    public void setRealQty(int realQty) {
        this.realQty = realQty;
    }

    public long getWarehouseAreaId() {
        return warehouseAreaId;
    }

    public void setWarehouseAreaId(long warehouseAreaId) {
        this.warehouseAreaId = warehouseAreaId;
    }

    public String getWarehouseAreaName() {
        return warehouseAreaName;
    }

    public void setWarehouseAreaName(String warehouseAreaName) {
        this.warehouseAreaName = warehouseAreaName;
    }

    public String getFromLocationNumber() {
        return fromLocationNumber;
    }

    public void setFromLocationNumber(String fromLocationNumber) {
        this.fromLocationNumber = fromLocationNumber;
    }

    public long getFromLocationId() {
        return fromLocationId;
    }

    public void setFromLocationId(long fromLocationId) {
        this.fromLocationId = fromLocationId;
    }
}
